/*
package com.c611.smartclassroom.config;

import com.c611.smartclassroom.annotation.MyResult;
import com.c611.smartclassroom.annotation.aspect.MyResultAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

@Configuration
@EnableWebMvc
@ComponentScan(basePackages = {"com.c611.smartclassroom.controller"},useDefaultFilters = true)
public class WebConfig extends WebMvcConfigurerAdapter {

    @Bean
    public MyResultAspect JsonReturnHandler(){
        MyResultAspect formatJsonReturnValueHandler = new MyResultAspect();
        return formatJsonReturnValueHandler;
    }


    @Override
    public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
        returnValueHandlers.add(JsonReturnHandler());
    }
}*/
